package com.ftg.learn.sm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.ftg.learn.sm.pojo.Book;






import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;



public interface IBook {

	@Select("select * from book")
	public List<Book> showAll();
	
	@Select("select * from book where bno = #{bno}")
	public List<Book> findone(String bno);
	
	@Update("update book set bname=#{bname},author=#{author},suoyin=#{suoyin},aa=#{aa},bb=#{bb},cc=#{cc},dd=#{dd} where bno = #{bno}")
	public int update(Book book);
	
	@Delete("delete from book where bno=#{bno}")
	public int delete(String bno);
	
	@Insert("insert into book(bname,author,suoyin,aa,bb,cc,dd) values(#{bname},#{author},#{suoyin},#{aa},#{bb},#{cc},#{dd})")
	public int save(Book book);
	
	
}
